<script type="text/javascript" src="jquery-1.10.1.min.js"></script>

<script type="text/javascript">
  jQuery(document).ready(function(){

    $('input[type="button"]').on('click',function(){
      //alert('Wow :) I am at 2nd');

      var txt = $('#inp2').val();
      $('#inp1').val(txt);
      $('#inp2').val('');
    });


  });
</script>

<input  id="inp1" placeholder="FIRST"/>

<input  id="inp2" placeholder="SECOND" value="This is text in II input..."/>

<input type="button" value="Click to COPY :) "/>
